using System;
using UnityEngine;

public static class AudioSourceExtensionsForAudioObserver
{
	public static AudioObserver RegisterAudioObserver(this AudioSource source)
	{
		AudioObserver audioObserver = source.gameObject.GetComponent<AudioObserver>();
		if (null == audioObserver)
		{
			audioObserver = source.gameObject.AddComponent<AudioObserver>();
		}
		return audioObserver;
	}
}
